<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>变换的工具栏</title>
    <link rel="stylesheet" href="css/font-awesome.min.css">
    <style>
        body{
            background-color: #cccccc;
        }
        /*
            外层容器定义大小和宽度，居中显示
        */
        .toolbar{
            max-width: 670px;
            min-width: 550px;
            width: 100%;
            margin: 150px auto;
        }
        .button{
            background-color: #3AB09E;
            width: 70px;
            height: 70px;
            border-radius: 50%;
            color: #ffffff;
            text-align: center;
            font-size: 3.5em;
            position: relative;
            left: 50%;
            margin-left: -35px;
            z-index: 1;
        }
        .active{
            transform: rotate(45deg);
            left: 60px;
        }
        .button:after{
            content: "+";
        }
        .icons{
            list-style: none;
            color: #3AB09E;
            background-color: #ffffff;
            width: 0;
            height: 36px;
            margin: -70px 0 0 45%;
            padding: 17px 10px 10px 50px;
            border-radius: 2em;
            overflow: hidden;
        }
        .icons li{
            width: 8%;
            display: none;
        }
        .open{
            padding: 17px 10px 17px 90px;
            width: 80%;
            margin: -70px 0 0 5%;
        }
        .open li{
            width: 16%;
            display: inline-block;
        }
        .button,.icons{
            transition:all 1s cubic-bezier(.9,-.4,.21,3);
        }
    </style>
</head>
<body>
<div class="toolbar">
    <div class="button"></div>
    <ul class="icons">
        <li class="fa fa-home fa-2x"></li>
        <li class="fa fa-user fa-2x"></li>
        <li class="fa fa-star fa-2x"></li>
        <li class="fa fa-file-text fa-2x"></li>
        <li class="fa fa-paper-plane fa-2x"></li>
    </ul>   
</div>
<script src="js/jquery-1.11.0.min.js"></script>
<script>
    $(".button").click(function (e) {
        $(".button").toggleClass("active");
        $(".icons").toggleClass("open");
    })
</script>
</body>
</html>